package org.example.socket网络编程.字符集编码;


import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class test {

    public static void main(String[] args) throws UnsupportedEncodingException {
        String str1 = "wode我的的";
        String str2 = "nide你的的";

        byte[] bytes1 = str1.getBytes();
        byte[] bytes2 = str2.getBytes("GBK");

        System.out.println(Arrays.toString(bytes1));
        System.out.println(Arrays.toString(bytes2));

        System.out.println(new String(bytes1));
        System.out.println(new String(bytes2,"GBK"));
    }

}
